#include "dominion.h"  
#include "dominion_helpers.h"  
#include "rngs.h"  
#include <stdio.h>  
#include <math.h>  
#include <stdlib.h>  
#include <assert.h>

int compare( const void *a, const void *b );

void testCompare( int a, int b, int c) {
  int r;
  r = compare(&a, &b);
  assert( r == -1 );

  r = compare(&b, &a);
  assert( r == 1 );

  r = compare(&a, &c);
  assert( r == 0);

}


int main(int argc, char *argv[]) {
  int i;
  int a, b, c;

  for(i=0; i<1000; i++){
    a = rand() / (RAND_MAX / 5000 + 1);
    b = (rand() / (RAND_MAX / 5000 + 1)) + 5000;
    c = a;
    testCompare(a, b , c);
  }

  printf("All tests successful!\n");

  return 0;
}